import { Component, OnInit } from '@angular/core';
import {ConfigService} from '../../services/config.service';
import {ActionSheetController} from '@ionic/angular';

@Component({
  selector: 'app-order',
  templateUrl: './order.page.html',
  styleUrls: ['./order.page.scss'],
})
export class OrderPage implements OnInit {

  constructor(public config:ConfigService
  ,public actionSheetController: ActionSheetController) { }

  ngOnInit() {


  }




  showPayMenu(){

    this.presentActionSheet();


  }




    async presentActionSheet() {
        const actionSheet = await this.actionSheetController.create({
            header: '支付方式',

            buttons: [
            {
                text: '微信支付',

                handler: () => {
                    console.log('Share clicked');
                }
            }, {
                text: '支付宝支付',

                handler: () => {
                    console.log('Play clicked');
                }
            }, {
                text: '取消',
                icon: 'close',
                role: 'cancel',
                handler: () => {
                    console.log('Cancel clicked');
                }
            }]
        });
        await actionSheet.present();
    }


}
